<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<base href="<%=basePath%>">
		<meta charset="utf-8" />
		<title></title>
		 <link rel="stylesheet" href="front/css/normal.css">
        <link rel="stylesheet" href="front/css/addBox.css">
        <link rel="stylesheet" href="front/content/css/projectAdm.css">
<script type="text/javascript">
</script>
	</head>
<body>
		<input type="hidden" name="filiale_apply_id" id="filiale_apply_id" value="${pd.filiale_apply_id}"/>
	<div class="boxStyle">
		      <p class="con-title">分公司申请信息</p>
		<table id="table_report" class="table table-striped table-bordered table-hover">
			<tr>
				<td>分公司名称:</td>
				<td>${pd.filiale_apply_name}</td>
				<td>业务范围:</td>
				<td>${pd.preparing_for_business}</td>
			</tr>
			<tr>
				<td>申请时间:</td>
				<td>${pd.filiale_apply_application_time}</td>
				<td>申请状态:</td>
				<td>
				<c:if test="${pd.filiale_apply_status == 0}">审核成功</c:if>
				<c:if test="${pd.filiale_apply_status == 1}">正在使用</c:if>
				<c:if test="${pd.filiale_apply_status == 2}">已归还</c:if>
				<c:if test="${pd.filiale_apply_status == 3}">已撤销</c:if>
				<c:if test="${pd.filiale_apply_status == 4}">审核中</c:if>
				<c:if test="${pd.filiale_apply_status == 5}">申请失败</c:if>
				</td>
			</tr>	
		</table>
		</div>
		<div style="height: 20px;"></div>
		<div class="boxStyle">
		      <p class="con-title">联系人信息</p>
		<table id="table_report" class="table table-striped table-bordered table-hover">
			<tr>
				<td>联系人姓名:</td>
				<td>${pd.related_name}</td>
				<td>身份证号码:</td>
				<td>${pd.id_card}</td>
			</tr>
			<tr>
				<td>联系电话:</td>
				<td>${pd.related_phone}</td>
				<td>身份证正面:</td>
				<td><img src="${pd.front_of_id_card}"></td>
			</tr>
			<tr>
				<td>身份证反面:</td>
				<td><img src="${pd.id_card_negative}"></td>
				<td>户籍证明:</td>
				<td><img src="${pd.household_register}"></td>
			</tr>
			<tr>
				<td>银行资信证明:</td>
				<td><img src="${pd.bank_prove}"></td>
			</tr>
		</table>
		</div>
		<div style="height: 20px;"></div>
		<div class="boxStyle">
		      <p class="con-title">洽谈结果</p>
		<table id="table_report" class="table table-striped table-bordered table-hover">
			<tr>
				<td>开始时间:</td>
				<td>${pd.start_time}</td>
				<td>结束时间:</td>
				<td>${pd.end_time}</td>
			</tr>
			<tr>
				<td>洽谈结果:</td>
			 <td>
				<c:if test="${pd.chat_status eq 1}">
				      洽谈成功  
				</c:if>
				<c:if test="${pd.chat_status eq -1}">
				       洽谈失败
				</c:if>
				</td>
				<td>洽谈内容:</td>
				<td>${pd.negotiate_content}</td>
			</tr>
			 <c:if test="${pd.chat_status eq -1}">
			<tr>
				<td>失败原因:</td>
				<td>${pd.fail_reason}</td>
			</tr>
			</c:if>
		</table>
		         <p class="btn-box">
                         <button onclick="javascript:history.back(-1);">返回</button>
                </p>
		</div>
		<div style="height: 20px;"></div>
 	<div  class="boxStyle">
			<p class="con-title">审核流程信息</p>
			<div id="histoicFlowList">
				<table class="table table-striped table-bordered table-condensed">
					<tr><th>执行环节</th><th>执行人</th><th>开始时间</th><th>结束时间</th><th>提交意见</th><th>任务历时</th></tr>
					<c:forEach items="${varList}" var="act">
						<tr>
							<td>${act.histIns.activityName}</td>
							<td>${act.assigneeName}</td>
							<td><fmt:formatDate value="${act.histIns.startTime}" type="both"/></td>
							<td><fmt:formatDate value="${act.histIns.endTime}" type="both"/></td>
							<td style="word-wrap:break-word;word-break:break-all;">${act.comment}</td>
							<td>${act.durationTime}</td>
						</tr>
					</c:forEach>
				</table>
			</div>
			  <div  class="boxStyle">
			        <p class="con-title" style="margin-top:60px;">流程审批图</p>
			        <div id="apply_image" style="text-align: center;padding:40px 0">
			           <iframe src="<%=basePath%>act/diagram-viewer?processDefinitionId=${act.procDefId }&processInstanceId=${act.procInsId}" frameborder="0" allowtransparency="true" onload="setIframeHeight(this)"></iframe> 
			        </div>
		       </div>
		</div> 
		<!-- 引入 -->
	    <script src="front/js/jquery-2.0.3.min.js"></script>
	   <script src="front/js/index.js"></script>
		<script type="text/javascript">

		
		$(top.hangge());
		$(function() {
			
			//单选框
			$(".chzn-select").chosen(); 
			$(".chzn-select-deselect").chosen({allow_single_deselect:true}); 
			
			//日期框
			$('.date-picker').datepicker();
		});
		
		</script>
</body>
</html>